'use strict';
import React from 'react';
import AMUIRect from 'amazeui-react';
var Slider = AMUIRect.Slider;

module.exports = React.createClass({
    render(){
        var data = [
            {
                thumb: 'http://s.amazeui.org/media/i/demos/bing-1.jpg',
                img: 'http://s.amazeui.org/media/i/demos/bing-1.jpg',
                desc: '专治发疯'
            },
            {
                thumb: 'http://s.amazeui.org/media/i/demos/bing-2.jpg',
                img: 'http://s.amazeui.org/media/i/demos/bing-2.jpg',
                desc: '熊大抽风了'
            },
            {
                thumb: 'http://s.amazeui.org/media/i/demos/bing-3.jpg',
                img: 'http://s.amazeui.org/media/i/demos/bing-3.jpg',
                desc: '熊二 犯傻'
            },
            {
                thumb: 'http://s.amazeui.org/media/i/demos/bing-4.jpg',
                img: 'http://s.amazeui.org/media/i/demos/bing-4.jpg',
                desc: '猴子称王'
            }];

        var sliderIntance = (
            <Slider directionNav={false}>
                {data.map(function (item, i) {
                    return (
                        <Slider.Item key={i} thumbnail={item.thumb}>
                            <img src={item.img}/>

                            <div className="am-slider-desc">
                                {item.desc}
                            </div>
                        </Slider.Item>
                    );
                })}
            </Slider>
        );
        return sliderIntance;
    }
});
